package com.fdm.model.dao.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.fdm.model.Customer;
import com.fdm.model.dao.CustomerDAO;
import com.fdm.util.exceptions.UniqueConstraintException;

@Service
public class CustomerService {
	@Autowired
 	private CustomerDAO customerDAO;
	
	public CustomerDAO getCustomerDAO() {
		return customerDAO;
	}

	public void setCustomerDAO(CustomerDAO customerDAO) {
		this.customerDAO = customerDAO;
	}

	public String createCustomer(Customer customer) throws UniqueConstraintException{
		customerDAO.createNewCustomer(customer);
		return "done";
	}
}
